﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VoteItem.aspx.cs" Inherits="Manage_Cms_VoteItem" %>

<html>
<head>
    <title>无标题页</title>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" type="text/css" />

    <script language="javascript" type="text/javascript">
        function VoteItemShow()
        {
            var InnerHTML="";
            var Count = document.getElementById("txtMax").value;
            InnerHTML+=" <table width='95%' align='left' cellpadding='3' cellspacing='3' >";
            for(var i=0;i<Count;i++)
            {
                InnerHTML+="<tr>"
                +"<td align='left' width='130'><img src='../pic/icons/help.gif' alt='标题' onclick='helpInf(this)' />"
                +""+(parseInt(i)+1)+" 标题：</td><td align='left' width='130'><input name='txtContent"+i+"' id='txtContent"+i+"' type='text' valid='required' errmsg='标题。' />"
                +"</td><td align='left' width='130'><img src='../pic/icons/help.gif' alt='票数' onclick='helpInf(this)' />票数："
                +"</td><td align='left'><input name='txtNum"+i+"' id='Text2' type='text' valid='required' errmsg='票数。' value='0' /> </td></tr>";
              
            }
            InnerHTML+=" </table>";
            document.getElementById("Content").innerHTML=InnerHTML;
        }
    </script>

</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <%=ManageHelper.PageErrMsg()!=""?"<div class='msg_failed'>"+ManageHelper.PageErrMsg()+"</div>":""%>
    <form id="form1" action="?act=addsave" method="post" onsubmit="return validator(this)">
        <%--act=<%=ActFlag %>--%>
        <div class="mycolumn">
            <div class="columntitle">
                添加投票
                <%--<%=ActName %>站点--%>
            </div>
            <table width="95%" align="center" cellpadding="3" cellspacing="3">
                <tr>
                    <td align="left" width="130">
                        <img src="../pic/icons/help.gif" alt="投票名称" onclick="helpInf(this)" />
                        投票名称：
                    </td>
                    <td align="left" class="tdselect">
                        <input name="txtTitle" id="txtTitle" type="text" valid="required" errmsg="投票名称。" />
                    </td>
                </tr>
                <tr>
                    <td align="left" width="130">
                        <img src="../pic/icons/help.gif" alt="标题" onclick="helpInf(this)" />
                        标题：
                    </td>
                    <td align="left">
                        <input name="txtContent" id="txtContent" type="text" valid="required" errmsg="标题。" />
                    </td>
                </tr>
                <tr>
                    <td align="left" width="130">
                        <img src="../pic/icons/help.gif" alt="投票类型" onclick="helpInf(this)" />
                        投票类型：
                    </td>
                    <td align="left" class="tdradio">
                        <input type="radio" id="radVoteChk" value="0" name="radVoteType" checked="checked" />单选
                        &nbsp;<input type="radio" id="radVoteRad" value="1" name="radVoteType" />多选
                    </td>
                </tr>
                <tr>
                    <td align="left" width="130">
                        <img src="../pic/icons/help.gif" alt="投票限制" onclick="helpInf(this)" />
                        投票限制：
                    </td>
                    <td align="left" class="tdradio">
                        <input type="radio" id="Radio1" value="0" name="radVoteLimit" checked="checked" />允许重复投票
                        &nbsp;<input type="radio" id="Radio2" value="1" name="radVoteLimit" />一天内禁止重复投票
                        &nbsp;<input type="radio" id="Radio3" value="2" name="radVoteLimit" />每台机器只能投一次
                        &nbsp;<input type="radio" id="Radio4" value="3" name="radVoteLimit" />每用户只能投一次票
                    </td>
                </tr>
                <tr>
                    <td align="left" width="130">
                        <img src="../pic/icons/help.gif" alt="设置投票项数目" onclick="helpInf(this)" />
                        设置投票项数目：
                    </td>
                    <td align="left">
                        <input name="txtMax" id="txtMax" type="text" value="" valid="required" errmsg="设置投票项数目"
                            style="width: 48px" onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />&nbsp;&nbsp;
                        <input type="button" id="btnAdd" class="tdbutton" value="设置" onclick="VoteItemShow();"
                            style="width: 60px;" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" id="Content" style="width: 100%;">
                        <%-- <table width="95%" align="center" cellpadding="3" cellspacing="3" >
                            <tr>
                                <td align="left" width="130">
                                    <img src="../pic/icons/help.gif" alt="标题" onclick="helpInf(this)" />
                                   1 标题：
                                </td>
                                <td align="left" width="130">
                                    <input name="txtContent" id="Text1" type="text" valid="required" errmsg="标题。" />
                                </td>
                                 <td align="left" width="130">
                                    <img src="../pic/icons/help.gif" alt="票数" onclick="helpInf(this)" />
                                   票数：
                                </td>
                                <td align="left">
                                    <input name="txtContent" id="Text2" type="text" valid="required" errmsg="票数。" />
                                </td>
                            </tr>
                        </table>--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="tdbutton" align="center">
                        <input type="submit" name="sub" value="添 加" />
                        <input type="button" name="return" value="返 回" onclick="javascript:window.history.go(-1)" />
                        <input type="hidden" id="txtSiteID" name="siteid" value="<%= KeRui.Common.PageRequest.GetInt("siteid",-1) %>" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
